package za.co.smartmi.dao;

import za.co.smartmi.model.SystemUserRole;
import za.co.smartmi.model.SystemUserRolePk;
import za.co.smartmi.dao.exceptions.SystemUserRoleDaoException;
import java.util.List;
import za.co.smartmi.dao.support.JdbcDao;

public interface SystemUserRoleDao extends JdbcDao
{
	/**
	 * Method 'insert'
	 * 
	 * @param dto
	 * @return SystemUserRolePk
	 */
	public SystemUserRolePk insert(SystemUserRole dto);

	/** 
	 * Updates a single row in the system_user_role table.
	 */
	public void update(SystemUserRolePk pk, SystemUserRole dto) throws SystemUserRoleDaoException;

	/** 
	 * Deletes a single row in the system_user_role table.
	 */
	public void delete(SystemUserRolePk pk) throws SystemUserRoleDaoException;

	/** 
	 * Returns all rows from the system_user_role table that match the criteria 'username = :username AND role = :role'.
	 */
	public SystemUserRole findByPrimaryKey(String username, String role) throws SystemUserRoleDaoException;

	/** 
	 * Returns all rows from the system_user_role table that match the criteria ''.
	 */
	public List<SystemUserRole> findAll() throws SystemUserRoleDaoException;

	/** 
	 * Returns all rows from the system_user_role table that match the criteria 'username = :username'.
	 */
	public List<SystemUserRole> findWhereUsernameEquals(String username) throws SystemUserRoleDaoException;

	/** 
	 * Returns all rows from the system_user_role table that match the criteria 'role = :role'.
	 */
	public List<SystemUserRole> findWhereRoleEquals(String role) throws SystemUserRoleDaoException;

	/** 
	 * Returns the rows from the system_user_role table that matches the specified primary-key value.
	 */
	public SystemUserRole findByPrimaryKey(SystemUserRolePk pk) throws SystemUserRoleDaoException;

}
